/* 加载状态组件 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(3px);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    position: absolute;
    margin-top: 80px;
    color: #333;
    font-size: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 提示组件 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    min-width: 250px;
    margin-bottom: 10px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    animation: slideIn 0.3s ease;
}

.toast-header {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.toast-body {
    padding: 12px 15px;
    color: #666;
}

.toast.success .toast-header {
    background: #28a745;
    color: white;
    border-radius: 8px 8px 0 0;
}

.toast.error .toast-header {
    background: #dc3545;
    color: white;
    border-radius: 8px 8px 0 0;
}

.toast.warning .toast-header {
    background: #ffc107;
    color: #333;
    border-radius: 8px 8px 0 0;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 表单验证反馈 */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 80%;
    color: #dc3545;
}

.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

/* 确认对话框 */
.modal-confirm {
    color: #636363;
}

.modal-confirm .modal-content {
    padding: 20px;
    border-radius: 12px;
    border: none;
}

.modal-confirm .modal-header {
    border-bottom: none;
    position: relative;
}

.modal-confirm .modal-footer {
    border-top: none;
    padding: 15px 25px;
}

.modal-confirm .icon-box {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 50%;
    z-index: 9;
    text-align: center;
    border: 3px solid #f15e5e;
}

.modal-confirm.delete .icon-box {
    border-color: #f15e5e;
}

.modal-confirm.warning .icon-box {
    border-color: #f0ad4e;
}

.modal-confirm .icon-box i {
    font-size: 46px;
    display: inline-block;
    margin-top: 13px;
    color: #f15e5e;
}

.modal-confirm .btn {
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.4s;
    line-height: normal;
    min-width: 120px;
    border: none;
    margin: 0 5px;
}

.modal-confirm .btn-secondary {
    background: #c1c1c1;
}

.modal-confirm .btn-secondary:hover,
.modal-confirm .btn-secondary:focus {
    background: #a8a8a8;
}

.modal-confirm .btn-danger {
    background: #f15e5e;
}

.modal-confirm .btn-danger:hover,
.modal-confirm .btn-danger:focus {
    background: #ee3535;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .toast-container {
        top: auto;
        bottom: 20px;
        left: 20px;
        right: 20px;
    }
    
    .toast {
        min-width: auto;
        margin: 0 auto 10px;
    }
    
    .modal-confirm .btn {
        min-width: 100px;
        margin: 5px;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .loading-text {
        font-size: 14px;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
} 